Git & Jekyll

2017-06-10

Jekyll is up and running locally on your machine-- writing posts and/or making it all pretty, but if it's not up on Github already you should probably get on that. In general, pushing code to Github is a good idea.

SETUP GIT (this preps your beautiful site for push/ send off)

$ git init .

$ git add --all

$ git commit -m "initial commit"

SETUP GITHUB (where your code gets pushed/ sent to)

Go to Github

  1. NEW REPO button
  2. NAME it, leave PUBLIC button NOTE: I don't check initialize readme, but if that's what your little heart desires-- go for it. I've seen others do it and nothing blows up :)
  3. CREATE REPO button

After page reloads you'll see a section that says "Push existing repo from command line"

NOTE: I used SSH which I believe uses pw already setup, while https will require username/pw each push, but either works.

Copy/paste git remote add... then, git push... in terminal

NOTE: Each command will populate info specific to github acct

If you check Github you should see your files on there.

  • Click SETTINGS and head down to GITHUB PAGES section.
  • Under SOURCE click the dropdown and click MASTER BRANCH or if you created a GH-PAGES branch then choose that one.
  • SAVE and you'll see a link like https://username.github.io/repoName/ show up

If all went smooth, congratulations your SITE is LIVE on Github Pages :)


← go back